﻿using System;
using System.Collections.Generic;
using System.Domain.Entity;
using System.Domain.IRepository;
using System.Text;
using Application.Infrastructure;
using Domain.Infrastructure;

namespace System.Application
{
    /// <summary>
    ///模块权限服务 
    /// </summary>	
    public class SysModuleAuthorizeService : BaseService_C_M_D<SysModuleAuthorizeEntity>
    {
        private readonly ISysModuleAuthorizeRepository _repository;
        public SysModuleAuthorizeService(ILog log, ISysModuleAuthorizeRepository repository) : this(log, repository, "")
        {
        }
        public SysModuleAuthorizeService(ILog log, ISysModuleAuthorizeRepository repository, string userId) : base(log, repository, userId)
        {
            _repository = repository;
        }

        public List<SysModuleAuthorizeEntity> GetList(Pagination pagination, string moduleId)
        {
            try
            {
                return _repository.GetList(pagination, moduleId);
            }
            catch (Exception ex)
            {
                Log.Error(ex);
                throw;
            }
        }
    }
}
